using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace QFramework.Adventure
{
    public class SnailController :FSMBaseObj
    {
        public bool isMove;

        private void OnEnable()
        {
            idleState = new SnailIdleState();
            patrolState = new SnailPatrolState();
            hitState = new SnailHitState();
            hideState = new SnailHideState();
            deathState = new SnailDeathState();

            TransitionToState(patrolState);
        }

        public override void Update()
        {
            base.Update();


            if (animHit && currentState != hitState)
            {
                TransitionToState(hitState);
            }
            else
            if (animDeath && currentState != deathState)
            {
                TransitionToState(deathState);
            }

        }

        public override void OnDisable()
        {
            base.OnDisable();
        }
    }
}